Skip to content

Conversation

MaicoTimmerman
Copy link
Contributor

@MaicoTimmerman MaicoTimmerman commented Jan 29, 2025

This PR moves the default files_handler_params from FileContentsManager to ContentsManager to match its signature.

In
https://github.com/jupyter-server/jupyter_server/pull/1069/files#diff-4d8c8c45026f674a455c1e41558c6a9a05d8766adc81a6e56d8cafc7e5d8077cR17 the web.StaticFileHandler was introduced as superclass to FilesHandler. This causes all subclasses of ContentsManager (e.g. a version for S3) to fail serving the file due to:

    Traceback (most recent call last):
      File "/home/bigdata/venv/lib64/python3.11/site-packages/tornado/http1connection.py", line 278, in _read_message
        delegate.finish()
      File "/home/bigdata/venv/lib64/python3.11/site-packages/tornado/httpserver.py", line 399, in finish
        self.delegate.finish()
      File "/home/bigdata/venv/lib64/python3.11/site-packages/tornado/routing.py", line 268, in finish
        self.delegate.finish()
      File "/home/bigdata/venv/lib64/python3.11/site-packages/tornado/web.py", line 2399, in finish
        self.execute()
      File "/home/bigdata/venv/lib64/python3.11/site-packages/tornado/web.py", line 2421, in execute
        self.handler = self.handler_class(
                       ^^^^^^^^^^^^^^^^^^^
      File "/home/bigdata/venv/lib64/python3.11/site-packages/tornado/web.py", line 238, in __init__
        self.initialize(**kwargs)  # type: ignore
        ^^^^^^^^^^^^^^^^^^^^^^^^^
    TypeError: StaticFileHandler.initialize() missing 1 required positional argument: 'path'

@MaicoTimmerman MaicoTimmerman force-pushed the move-files_handler_params-to-content branch from 839f1c9 to 858007d Compare April 16, 2025 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant